import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import {
	Search,
	Button,
	Picker,
	Field,
	Popup,
	List,
	SwipeCell,
	NavBar,
	Tabbar,
} from "vant";
import "vant/lib/index.css";

import { LazyImg, Waterfall } from "vue-waterfall-plugin-next";
import "vue-waterfall-plugin-next/dist/style.css";

import ElementPlus from "element-plus";
import * as ElementPlusIcons from "@element-plus/icons-vue"; //引入图标
import "element-plus/dist/index.css";

import "@wangeditor/editor/dist/css/style.css";

const app = createApp(App);

app.use(Search)
	.use(NavBar)
	.use(SwipeCell)
	.use(Button)
	.use(Picker)
	.use(Field)
	.use(Popup)
	.use(List)
	.use(Tabbar)
	.use(ElementPlus)
	.use(store)
	.use(router)
	.mount("#app");

app.component("LazyImg", LazyImg);
app.component("Waterfall", Waterfall);

Object.keys(ElementPlusIcons).forEach(key => {
	app.component(key, ElementPlusIcons[key]);
});
